package com.hong.concurrent.chapter4;

/**
 * @Author csh
 * @Description 观察者模式
 * @Date 2018/6/30 11:18
 */
public class ObserverClient {
    public static void main(String[] args) {
        final  Subject subject= new Subject();

        new BinaryObserver(subject);
        new OctalObServer(subject);
        System.out.println("=======================");
        subject.setState(10);
        System.out.println("=======================");
        subject.setState(10);
        System.out.println("=======================");
        subject.setState(15);
    }
}
